﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DAL;

namespace BLL
{
    public class KefuBLL
    {
        KefuDAL kf = new KefuDAL();

        public DataTable getKefu()
        {
            return kf.shows();
        }

        public void addKefu(string account, string nickname, string password)
        {
            int i = kf.add(account, nickname, password);
        }

        public bool delKefu(string account)
        {
            int i = kf.del(account);
            if (i == 1)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        public void alterKefu(string nickname, string password, string account)
        {
            int i = kf.alters(nickname, password, account);
        }

        public void truncKefu()
        {
            kf.trunc();
        }

        public int updateKefu(DataTable dt)
        {
            int i = kf.updates(dt);
            return i;
        }
    }
}
